﻿using System;
using Microsoft.Practices.EnterpriseLibrary.Validation;
using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;

namespace Mvc.Validation.Validators
{
    public class AlwaysTrueValidator : ValueValidator,IValidator
    {
        public AlwaysTrueValidator()
            : base(string.Empty, string.Empty,false)
        {

        }
        protected override string DefaultNegatedMessageTemplate
        {
            get { return string.Empty; }
        }

        protected override string DefaultNonNegatedMessageTemplate
        {
            get { return string.Empty; }
        }

        protected override void DoValidate(object objectToValidate, object currentTarget, string key, ValidationResults validationResults)
        {
            return;
        }

        #region IValidator Members

        public bool IsValid(object value)
        {
            return true;
        }

        #endregion
    }
}
